import RestClient from "@/driver/RestClient"
const AgreeRecordService = {
    /**
     * 点赞.
     * @param type
     * @param id
     * @param callback
     * @param failCallback
     */
    addAgree(type, id, callback, failCallback) {
        RestClient.post(`/api/v1/agree-records`, {
            type: type,
            recordId: id
        }, callback, failCallback)
    },
    /**
     * 取消点赞.
     * @param type
     * @param id
     * @param callback
     * @param failCallback
     */
    cancelAgree(type, id, callback, failCallback) {
        RestClient.delete(`/api/v1/agree-records?type=${type}&recordId=${id}`, callback, failCallback)
    }
}

export default AgreeRecordService